Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't reset the cursor X to 0 when we would otherwise wrap #3280

Conversation

DHowett-MSFT
Copy link
Contributor

Fixes #3277.
Partially reverts #2965.

Summary of the Pull Request

Resetting the cursor position to X=0 made it act pretty strange when some applications wanted to do a full screen repaint.

PR Checklist

Validation Steps Performed

I spent two hours bisecting this, so I've hit Ctrl+B quite a lot in vim.

@skyline75489
Copy link
Collaborator

I suspect this will once again cause invalid args assertion error as described in my comment in #2932

@DHowett-MSFT
Copy link
Contributor Author

Fair. I'll have a look.

@skyline75489
Copy link
Collaborator

In #2932 I'm using

```diff

+        if (proposedCursorPosition.X > bufferSize.Width() - 1)
+       
+            proposedCursorPosition.X = bufferSize.Width() - 1;
+        }
+
         // This section is essentially equivalent to `AdjustCursorPosition`
         // Update Cursor Position
         cursor.SetPosition(proposedCursorPosition);

I didn't really know which one is correct between 0 and bufferSize.Width() - 1. Guess that #3277 ruled out 0.

@DHowett-MSFT
Copy link
Contributor Author

I wonder if the assertion triggers in cases where #1360 would have already triggered? Where we are at the righthand side of the screen with one half of a double-width character that shouldn't have been put there?

@skyline75489
Copy link
Collaborator

Yeah it appears to be the same issue. Only that #1360 happens in release build, where assertion doesn't trigger, I think.

@zadjii-msft
Copy link
Member

With #3292 fixing #3277 by fully reverting both and #2965, #2932, should this PR be closed?

Do we also need to re-open the original PRs/issues?

#2965 closed #2986, and apparently fixed a crash introduced by #2932

#2932 closed #2713

@DHowett-MSFT
Copy link
Contributor Author

Yep, thanks!

@DHowett-MSFT DHowett-MSFT deleted the dev/duhowett/gouge_a_huge_slash_in_the_screen_why_don't_ya branch October 30, 2019 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diagonal blanks when using vim
4 participants